#include<iostream>
using namespace std;
int main()
{
	int f, s, ans = 0;
	char fuhao;
	cin >> f;
	while (scanf_s("%c", &fuhao) && fuhao != '\n')
	{
		cin >> s;
		if (fuhao == '+')
		{
			ans += f;
			f = s;
		}
		else
		{
			f *= s;
		}
	}
	cout << ans + f << endl;
	return 0;
}